package com.fr;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class deff {
	public static void main(String[] args) throws Exception {
//		System.out.println("南江站".endsWith("站"));
		Map<String, String[]> map1 = init("F:\\sign data\\biz_district_sign.csv");
		Map<String, String[]> map2 = init("F:\\sign data\\poi.csv");
		
		for(Map.Entry<String, String[]> entry : map1.entrySet()) {
			if (!map2.containsKey(entry.getKey()) ) {
				if("\"2008\"".equals(entry.getValue()[2])) {
					continue;
				}
				if(entry.getValue().length >= 8 && "\"N\"".equals(entry.getValue()[8])) {
					continue;
				}
				if(entry.getValue()[3].endsWith("站\"") || entry.getValue()[3].endsWith("机场\"")) {
					continue;
				}
				System.out.println(entry.getValue()[0] + "\t" + entry.getValue()[3]);
			}
		}
	}

	private static Map<String, String[]> init(String filePath) throws IOException{
		FileReader fr = new FileReader(filePath);
		BufferedReader br = new BufferedReader(fr);
		Map<String, String[]> map = new HashMap<>();
		String line = br.readLine();
		while(line != null) {
			String[] rs = line.split(",");
			map.put(rs[3], rs);
			line = br.readLine();
		}
		br.close();
		fr.close();
		return map;
	}
}
